package com.szrt.java.day20170113.ch08;

public class CarFactory {
	
	public static Car createCar(String car){
		if("byd".equals(car)){
			return new BYD("比亚迪");
		}else if("bmw".equals(car)){
			return new BMW("宝马");
		}else{
			return null;
		}
	}

}
